package com.niiwoo.civet.account.dao.mapper;


import com.niiwoo.civet.account.dao.entity.BatchTransOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BatchTransOrderMapperExt extends BatchTransOrderMapper {
    BatchTransOrder selectOrderByBatchRequestNo(String batchRequestNo);

    /**
     * 正常标还款状态
     *
     * @param projectId
     * @param currentPeriod
     * @return
     */
    int queryOrderByProIdAndPeriod(@Param("projectId") Long projectId, @Param("currentPeriod") Integer currentPeriod);

    /**
     * 逾期标还款状态
     *
     * @param projectId
     * @param currentPeriod
     * @return
     */
    int queryOverdueOrderByProIdAndPeriod(@Param("projectId") Long projectId);

    int queryOrderByProIdHanding(@Param("projectId") Long projectId);

    List<BatchTransOrder> selectBatchTransOrderByStatus(@Param("createTime") String createTime,@Param("endTime")String endTime);

    List<Long> selectBatchTransOrderIdByStatus(@Param("createTime") String createTime,@Param("endTime")String endTime);

    int updateByPrimaryKeyHandingSelective(BatchTransOrder batchTransOrder);

    int queryOrderByProIdAndPeriodType(@Param("projectId") Long projectId, @Param("batchRefundType") Byte batchRefundType);

}